Skip to content

refactor: stop adopting report comments from before v2.13 - #359

Merged
shenxianpeng merged 1 commit into
mainfrom
refactor/drop-legacy-titles
Nov 23, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
refactor/drop-legacy-titles

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

v2.13.0 (August) added a hidden marker to the PR comment. Comments posted by older versions have no marker, so LEGACY_TITLES kept adopting them by their title, so that the first run after an upgrade edited the old comment instead of posting a second one. That upgrade window is long past.

Before vs after

PR has… Before After
a bot comment with the marker edited edited (unchanged)
a bot comment titled # Commit Check / # Commit-Check, no marker edited (adopted) left alone, new comment posted
a person's comment, any title left alone left alone (unchanged)

Changes

  • action/publish.py: remove LEGACY_TITLES and the title-prefix branch of _find_own_comments; only marked bot comments are edited or deleted.
  • tests/publish_test.py: the update test now uses a marked comment; the adoption test now checks that an unmarked bot comment is left alone.

412 tests pass, coverage stays at 100%, pre-commit clean.

Summary by CodeRabbit

  • Bug Fixes
    • Unmarked legacy bot comments are no longer adopted or removed. Only comments marked as managed reports are eligible for updates or cleanup.

v2.13.0 added a marker to the PR comment. Comments posted before it
were adopted by their title so the first run after an upgrade edited
the old comment instead of posting a second one. That release is
months old, so drop LEGACY_TITLES and match on the marker only.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 23, 2026 20:32
@shenxianpeng shenxianpeng self-assigned this Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The publishing action no longer adopts unmarked bot reports by legacy title. It selects the last marked bot comment and treats earlier marked comments as stale. Tests verify that unmarked legacy reports remain untouched.

Changes: Comment selection

Layer / File(s) Summary
Marked comment lookup
action/publish.py, tests/publish_test.py
The lookup selects the last marked bot comment and returns earlier marked comments as stale. If no marked comment exists, it returns no target. Tests verify that unmarked legacy comments are not adopted or edited.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Possibly related PRs

Merge Risk: Minimal · up to 107f6

Unmarked reports posted before v2.13 will no longer be edited, so the first run creates a new marked report. This is the stated intent of the change. No merge-blocking code risk remains, though the PR description should be fixed to pass the commit check.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "refactor: stop adopting report comments from before v2.13" matches the main change. The PR removes title-based adoption of unmarked legacy bot comments (LEGACY_TITLES), so report comments a…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "refactor: stop adopting report comments from before v2.13" matches the main change. The PR removes title-based adoption of unmarked legacy bot comments (LEGACY_TITLES), so report comments are matched only by COMMENT_MARKER. The title is concise, specific, and follows a conventional commit style.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0987155d-351c-40f7-9e8e-9e7af296b231
Commits

Reviewing files that changed from the base of the PR and between 496e6dc and 107f6a6.

Files selected for processing: 2

  • action/publish.py
  • tests/publish_test.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

✔ Commit Check passed

✔ Pull request: 2 passed
✔ Commits: passed
✔ Author: 2 passed
✔ Branch: passed

All 6 checks
Pull request
  ✔ title        refactor: stop adopting report comments from before v2.13
  ✔ description  no AI attribution
Commits
  ✔ 107f6a6      refactor: stop adopting report comments from before v2.13
Author
  ✔ name         Xianpeng Shen
  ✔ email        3353385+shenxianpeng@users.noreply.github.com
Branch
  ✔ branch       refactor/drop-legacy-titles

Checked by Commit Check 2.24.1 · Rules · Check before you push

@github-actions github-actions Bot added the ai-assisted Written with the help of an AI tool label Nov 23, 2026
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (496e6dc) to head (107f6a6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #359   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines         1281      1279    -2     
=========================================
- Hits          1281      1279    -2     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shenxianpeng shenxianpeng removed the ai-assisted Written with the help of an AI tool label Nov 23, 2026 — with Claude
@shenxianpeng shenxianpeng added the maintenance Maintenance update label Nov 23, 2026
@shenxianpeng
shenxianpeng merged commit 4e49d0f into main Nov 23, 2026
21 of 25 checks passed
@shenxianpeng
shenxianpeng deleted the refactor/drop-legacy-titles branch November 23, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant